import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import page1 from '@/components/page1'
import page2 from '@/components/page2'
import page3 from '@/components/page3'
import page4 from '@/components/page4'
import page5 from '@/components/page5'
import mine from '@/components/mine'
import newOP from '@/components/new'
import pending from '@/components/pending'

Vue.use(Router)


export default new Router({
  mode: 'history',
  routes: [
	  {
	      path: '/',
	      component: HelloWorld,
	  },
     {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld,
       meta: {
        requireLogin: true,
        index: 1
      },
      children: [
        {
        	path: 'page1',
	        name: 'page1',
	        component: page1,
            meta: {
	          requireLogin: true,
	          keepAlive: false,
	          index: 2
            },
            children: [
              {
              	path: 'page4',
		        name: 'page4',
		        component: page4,
	            meta: {
		          requireLogin: true,
		          keepAlive: false,
		          index: 3
	            },
	            children: [
	              {
	              	path: 'page5',
			        name: 'page5',
			        component: page5,
		            meta: {
			          requireLogin: true,
			          keepAlive: false,
			          index: 4
		            },
	              }
	            ]
              }
            ]
            
            /*children: [
              {
              	path: 'page2',
		        name: 'page2',
		        component: page2,
	            meta: {
		          requireLogin: true,
		          keepAlive: false,
		          index: 3
	            },
	            children: [
	              {
	             	path: 'page3',
			        name: 'page3',
			        component: page3,
		            meta: {
			          requireLogin: true,
			          keepAlive: false,
			          index: 4
		            },
	              }
	            ]
              }
            ]*/
        },
        {
        	path: 'page2',
	        name: 'page2',
	        component: page2,
            meta: {
	          requireLogin: true,
	          keepAlive: false,
	          index: 2
            },
            
        },
        {
        	path: 'page3',
	        name: 'page3',
	        component: page3,
            meta: {
	          requireLogin: true,
	          keepAlive: false,
	          index: 2
            },
        }
        /*{
        	path: 'mine',
	        name: 'mine',
	        component: mine,
            meta: {
	          requireLogin: true,
	          keepAlive: false,
	          index: 2
            },
        },
        {
        	path: 'pending',
	        name: 'pending',
	        component: pending,
            meta: {
	          requireLogin: true,
	          keepAlive: false,
	          index: 2
            },
        },
        {
        	path: 'new',
	        name: 'new',
	        component: newOP,
            meta: {
	          requireLogin: true,
	          keepAlive: false,
	          index: 2
            },
        }*/
      ]
    }
  ]
})
